package com.woniu.common.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * tb_jp_user_hospital
 * @author 
 */
public class TbJpUserHospital implements Serializable {
    private Integer id;

    private Integer hospitalid;

    private Integer departid;

    /**
     * 管理员id
     */
    private Integer userid;

    /**
     * 类型
     */
    private Integer type;

    /**
     * 分成比例
     */
    private BigDecimal share;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getHospitalid() {
        return hospitalid;
    }

    public void setHospitalid(Integer hospitalid) {
        this.hospitalid = hospitalid;
    }

    public Integer getDepartid() {
        return departid;
    }

    public void setDepartid(Integer departid) {
        this.departid = departid;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getShare() {
        return share;
    }

    public void setShare(BigDecimal share) {
        this.share = share;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbJpUserHospital other = (TbJpUserHospital) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHospitalid() == null ? other.getHospitalid() == null : this.getHospitalid().equals(other.getHospitalid()))
            && (this.getDepartid() == null ? other.getDepartid() == null : this.getDepartid().equals(other.getDepartid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getShare() == null ? other.getShare() == null : this.getShare().equals(other.getShare()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHospitalid() == null) ? 0 : getHospitalid().hashCode());
        result = prime * result + ((getDepartid() == null) ? 0 : getDepartid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getShare() == null) ? 0 : getShare().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", hospitalid=").append(hospitalid);
        sb.append(", departid=").append(departid);
        sb.append(", userid=").append(userid);
        sb.append(", type=").append(type);
        sb.append(", share=").append(share);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}